# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=crypthook
pkgver=18.690dcae
pkgrel=1
groups=('blackarch' 'blackarch-crypto' 'blackarch-tunnel' 'blackarch-networking')
pkgdesc='TCP/UDP symmetric encryption tunnel wrapper.'
arch=('x86_64' 'aarch64')
url='https://github.com/chokepoint/CryptHook'
license=('custom:unknown')
depends=('openssl')
makedepends=('git')
source=("$pkgname::git+https://github.com/chokepoint/CryptHook.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.so" "$pkgdir/usr/share/$pkgname/$pkgname.so"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

